﻿using System;
using System.Collections.Generic;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002B4 RID: 692
	public class TDatatypeAttribute : TParseTreeNode
	{
		// Token: 0x06001774 RID: 6004 RVA: 0x00328298 File Offset: 0x00326498
		public static EDataTypeAttribute searchDataTypeAttributeByName(string typenameStr)
		{
			if (TDatatypeAttribute.dataTypeAttributeMap.Count == 0)
			{
				TDatatypeAttribute.dataTypeAttributeMap["not_null"] = EDataTypeAttribute.not_null_t;
				TDatatypeAttribute.dataTypeAttributeMap["uppercase"] = EDataTypeAttribute.uppercase_t;
				TDatatypeAttribute.dataTypeAttributeMap["uc"] = EDataTypeAttribute.uppercase_t;
				TDatatypeAttribute.dataTypeAttributeMap["casespecific"] = EDataTypeAttribute.casespecific_t;
				TDatatypeAttribute.dataTypeAttributeMap["not_casespecific"] = EDataTypeAttribute.not_casespecific_t;
				TDatatypeAttribute.dataTypeAttributeMap["format"] = EDataTypeAttribute.format_t;
				TDatatypeAttribute.dataTypeAttributeMap["title"] = EDataTypeAttribute.title_t;
				TDatatypeAttribute.dataTypeAttributeMap["named"] = EDataTypeAttribute.named_t;
				TDatatypeAttribute.dataTypeAttributeMap["default"] = EDataTypeAttribute.default_t;
				TDatatypeAttribute.dataTypeAttributeMap["character_set"] = EDataTypeAttribute.character_set_t;
			}
			EDataTypeAttribute result = EDataTypeAttribute.unknown_t;
			if (!TDatatypeAttribute.dataTypeAttributeMap.TryGetValue(typenameStr.ToLower(), out result))
			{
				result = EDataTypeAttribute.unknown_t;
			}
			return result;
		}

		// Token: 0x170004DF RID: 1247
		// (get) Token: 0x06001776 RID: 6006 RVA: 0x0032837F File Offset: 0x0032657F
		// (set) Token: 0x06001775 RID: 6005 RVA: 0x00328376 File Offset: 0x00326576
		public virtual EDataTypeAttribute AttributeType
		{
			get
			{
				return this.attributeType;
			}
			set
			{
				this.attributeType = value;
			}
		}

		// Token: 0x170004E0 RID: 1248
		// (get) Token: 0x06001777 RID: 6007 RVA: 0x00328387 File Offset: 0x00326587
		// (set) Token: 0x06001778 RID: 6008 RVA: 0x0032838F File Offset: 0x0032658F
		public virtual string AttributeValue
		{
			get
			{
				return this.attributeValue;
			}
			set
			{
				this.attributeValue = value;
			}
		}

		// Token: 0x06001779 RID: 6009 RVA: 0x00328398 File Offset: 0x00326598
		public override void init(object arg1)
		{
			this.attributeType = (EDataTypeAttribute)arg1;
		}

		// Token: 0x170004E1 RID: 1249
		// (get) Token: 0x0600177A RID: 6010 RVA: 0x003283A6 File Offset: 0x003265A6
		// (set) Token: 0x0600177B RID: 6011 RVA: 0x003283AE File Offset: 0x003265AE
		public virtual TExpressionList Value_list
		{
			get
			{
				return this.value_list;
			}
			set
			{
				this.value_list = value;
			}
		}

		// Token: 0x170004E2 RID: 1250
		// (get) Token: 0x0600177C RID: 6012 RVA: 0x003283B7 File Offset: 0x003265B7
		// (set) Token: 0x0600177D RID: 6013 RVA: 0x003283BF File Offset: 0x003265BF
		public virtual TConstant Value_literal
		{
			get
			{
				return this.value_literal;
			}
			set
			{
				this.value_literal = value;
			}
		}

		// Token: 0x170004E3 RID: 1251
		// (get) Token: 0x0600177E RID: 6014 RVA: 0x003283C8 File Offset: 0x003265C8
		// (set) Token: 0x0600177F RID: 6015 RVA: 0x003283D0 File Offset: 0x003265D0
		public virtual TObjectName Value_identifier
		{
			get
			{
				return this.value_identifier;
			}
			set
			{
				this.value_identifier = value;
			}
		}

		// Token: 0x06001780 RID: 6016 RVA: 0x003283DC File Offset: 0x003265DC
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			if (arg2 is TObjectName)
			{
				this.value_identifier = (TObjectName)arg2;
				this.attributeValue = this.value_identifier.ToString();
				return;
			}
			if (arg2 is TConstant)
			{
				this.value_literal = (TConstant)arg2;
				this.attributeValue = this.value_literal.ToString();
				return;
			}
			if (arg2 is TExpressionList)
			{
				this.value_list = (TExpressionList)arg2;
			}
		}

		// Token: 0x170004E4 RID: 1252
		// (set) Token: 0x06001781 RID: 6017 RVA: 0x00328450 File Offset: 0x00326650
		public static IDictionary<string, EDataTypeAttribute> DataTypeAttributeMap
		{
			set
			{
				TDatatypeAttribute.dataTypeAttributeMap = value;
			}
		}

		// Token: 0x0400180D RID: 6157
		private static IDictionary<string, EDataTypeAttribute> dataTypeAttributeMap = new Dictionary<string, EDataTypeAttribute>();

		// Token: 0x0400180E RID: 6158
		private EDataTypeAttribute attributeType = EDataTypeAttribute.unknown_t;

		// Token: 0x0400180F RID: 6159
		private string attributeValue;

		// Token: 0x04001810 RID: 6160
		private TObjectName value_identifier;

		// Token: 0x04001811 RID: 6161
		private TConstant value_literal;

		// Token: 0x04001812 RID: 6162
		private TExpressionList value_list;
	}
}
